Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #163. Expressions were simplified to the fullest (e.g.,
true), which was not helpful to see in the error message, especially in the terminal version which does not allow for expansion.To fix this, two changes were made:
unwrapDerivedLiteralsthat is called after the simplification is performed, to traverse the derivation tree and replace boolean literals with the expressions that produced them, but only when at least one operand in the derivation is non-boolean (otherwise the boolean literal is okay)Examples
Before & After
x > 5 && x == 10→10 > 5→truex > 5 && x == 10→10 > 5Before & After
x == y > 0 && y == 1→x == 1 > 0→x == truex == y > 0 && y == 1→x == 1 > 0Before & After
...→1 == 1 && 2 == 2→true&&true→true...→1 == 1 && 2 == 2